#include <strmif.h>
#include <comdef.h>
//#include <event.h>
#include <control.h>
#include <uuids.h>
#include "graphutil.hpp"
#include "cmdline.hpp"
#include <amvideo.h>
#include <dvdmedia.h>

class App
{
    App(const App&);
    App& operator=(const App&);
    
public:

    explicit App(HANDLE);
    int operator()(int, wchar_t*[]);
    
private:

    const HANDLE m_hQuit;
    CmdLine m_cmdline;    
    GraphUtil::IFilterGraphPtr m_pGraph;
    GraphUtil::IMediaSeekingPtr m_pSeek;
    
    int CreateGraph();
    void DestroyGraph();
    int RunGraph();

    static void DumpVideoMediaType(const AM_MEDIA_TYPE&);
    static void DumpVideoInfoHeader(const VIDEOINFOHEADER&);
    static void DumpVideoInfoHeader2(const VIDEOINFOHEADER2&);
    static void DumpBitMapInfoHeader(const BITMAPINFOHEADER&);
    static void DumpAudioMediaType(const AM_MEDIA_TYPE&);

};
